﻿using RestSharp;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MebApp.Launcher.Views
{
    public partial class FormRegister : BaseForm
    {
        public FormRegister()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            var name = this.textBox1.Text;
            var email = this.textBox2.Text;
            var message = this.textBox3.Text;
            var resp = LauncherApp.AppClient.Register(name, email, message);
            if (resp.code != 200)
            {
                this.MessageBoxShow(resp.msg);
            }
            else
            {
                this.DialogResult = DialogResult.OK;
                return;
            }
        }

    }
}
